//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Collections;
using System.Xml;
using CommunityServer.Configuration;

namespace CommunityServer.Components
{
	public class ExtendedUserData
	{
		private static readonly IList fields = new ArrayList();

		static ExtendedUserData()
		{
			XmlNode node = CSConfiguration.GetConfig().GetConfigSection("CommunityServer/ExtendedUserData");

			if (node == null)
				return;

			foreach(XmlNode n in node.ChildNodes)
			{
				if(n.NodeType != XmlNodeType.Comment)
				{
					if(n.Name == "add")
					{
						string name  = n.Attributes["name"].Value;
						fields.Add(name);
					}
				}
			}
		}

		public static IList Fields
		{
			get{ return fields; }
		}
	}
}